package org.lyc.lanqiao.bank;

import java.util.Scanner;

/**
 * 成绩统计
 * 计算输入成绩的及格率和优秀率,60以上及格,85以上优秀,使用百分数表示,百分号前四舍五入保留整数
 * 第一行输入人数n, 剩余n行输入成绩
 * 输入:
 * 7
 * 80
 * 92
 * 56
 * 74
 * 88
 * 100
 * 0
 * 输出:
 * 71%
 * 43%
 * https://www.lanqiao.cn/problems/502/learning/?page=1&first_category_id=1&second_category_id=3&sort=students_count&asc=0
 *
 * @author Liu Yicong
 * @date 2024/1/27
 */

public class DScoresStatistics {
	static int pass = 60;//及格分数
	static int great = 85;//优秀分数
	static int passNum = 0;//及格人数
	static int greatNum = 0;//优秀人数

	public static void main(String[] args) {
		//输入数据
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			int score = sc.nextInt();
			if (score >= pass) {
				passNum++;
				if (score >= great) {
					greatNum++;
				}
			}
		}
		Long greatRate = Math.round(greatNum * 100D / n);
		Long passRate = Math.round(passNum * 100D / n);
		System.out.println(passRate + "%");
		System.out.println(greatRate + "%");
	}
}
